<include file="Public/header" title="添加新闻" />
<div id="page-wrapper">
   <ol class="breadcrumb">
        <li class="breadcrumb-item">
          <a href="/admin.php">首页</a>
        </li>
        <li class="breadcrumb-item active"><a href='{:U("news/index")}'>新闻管理</a></li>
        <li class="breadcrumb-item active">添加新闻</li>
      </ol>
    <div class="row">
        <div class="col-lg-12">
            
        </div>
    </div>

    <form method="POST" name="addnews" action="{:U('news/add')}">
        <div class="form-group">
            <label for="article-title">新闻标题</label>
            <input type="text" name="title" class="form-control" id="article-title" placeholder="输入新闻标题">
        </div>
        <div class="form-group">
            <label for="article-title">新闻描述</label>
            <input type="text" name="description" class="form-control"  placeholder="输入新闻标题">
        </div>
        <div class="form-group">
            <label for="article-content">新闻内容</label>
            <script id="article-content" name="content" type="text/plain"></script>
        </div>
        <button type="submit" class="btn btn-default">提交</button>
        <button class="btn btn-success fileinput-button" type="button" id="upimg">上传封面图</button>
        <input type="file" id="thumb_img" name="thumb_img_post" style="display: none">
        <input type="hidden" value="" name="thumb_img" id="save_thumb_path">
    </form>
    <div id="show_img">

    </div>
</div>
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('article-content',{
        toolbars: [
            ['fullscreen', 'source', 'undo', 'redo','bold', 'italic', 'underline','fontborder', 'strikethrough', '|','simpleupload', 'insertimage','attachment','emotion','link','unlink', '|', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote','searchreplace', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc'],
            ['inserttable','insertrow', 'insertcol','mergeright', 'mergedown','deleterow', 'deletecol','splittorows','splittocols', 'splittocells','deletecaption','inserttitle', 'mergecells', 'deletetable','insertparagraphbeforetable', 'paragraph','fontsize','fontfamily']
        ],
        initialFrameHeight:500,
        zIndex:100
    });
</script>
<include file="Public/footer" />
<script charset="utf-8" src="__PUBLIC__/js/upImg.js"></script>